﻿using AJWPFAdmin.Core.Logger;
using AJWPFAdmin.Core.Utils;
using DocumentFormat.OpenXml.Drawing;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AJWPFAdmin.Core.HardwareSDKS.EQLED
{
    public  class EQLEDUtil
    {
        public static bool Try_User_DelAllProgram(int cardNum)
        {
            var result = false;
			try
			{
                EQLEDSDK.User_DelAllProgram(cardNum);
                result = true;
            }
			catch (Exception e)
			{
                CommonUtil.Logger.Error($"EQLED User_DelAllProgram 异常:{e.Message}", e);
            }
            return result;
        }

        public static int Try_User_AddProgram(int cardNum)
        {
            var result = -1;
            try
            {
                result = EQLEDSDK.User_AddProgram(cardNum, false, 10);
            }
            catch (Exception e)
            {
                CommonUtil.Logger.Error($"EQLED User_AddProgram 异常:{e.Message}", e);
            }
            return result;
        }
    }
}
